<div class="modal" ng-controller="KisBpmChoseAssignmentCtrl">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button aria-hidden="true" class="close" data-dismiss="modal" ng-click="close()" type="button">&times;
                </button>
                <h2 translate>PROPERTY.ASSIGNMENT.TITLE</h2>
            </div>
            <div class="modal-body">
                <div class="row row-no-gutter">
                    <div class="col-xs-3">
                        <div id="z_tree">
                            <div ng-repeat="role in roles">
                                <ul class="list-group" ng-class="{collapsed: !group.expanded, 'first': $first}"
                                    style="margin-bottom: 1px">
                                    <li class="list-group-item" style="cursor: pointer;">
										<span ng-click="getAllAccountByRole(role.id)">
											{{role.name}}
										</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-8">
                        <table class="table table-bordered table-condensed">
                            <thead>
                            <tr>
                                <th><input ng-click="selectAll($event)" ng-if="choseAssignmentFlag=='assignees'"
                                           type="checkbox"></th>
                                <th>用户名</th>
                                <th>姓名</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-click="selectThis($event,account)" ng-repeat="account in accounts">
                                <td>
                                    <input name="accountsIds" ng-click="$event.stopPropagation();"
                                           ng-if="choseAssignmentFlag=='assignee'" ng-model="account.checked" type="radio"
                                           value="{{account.id}}"
                                    >

                                    <input ne-true-value="{{account.id}}" ng-click="$event.stopPropagation();"
                                           ng-false-value="false" ng-if="choseAssignmentFlag=='assignees'" ng-model="account.selected"
                                           type="checkbox">
                                </td>
                                <td>{{account.code}}</td>
                                <td>{{account.name}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>


            </div>
            <div class="modal-footer">


                <div>
                    <p style="float: left;margin-top: 7px;"></p>
                    <tm-pagination conf="paginationConf"></tm-pagination>
                </div>

                <button class="btn btn-inverse" ng-click="close()" translate>ACTION.CANCEL</button>
                <button class="btn btn-primary" ng-click="save()" translate>ACTION.SAVE</button>
            </div>
        </div>
    </div>
</div>